import os

env = Environment(
    ENV=os.environ,
    CXXFLAGS= ['-g', '-Wall', '-Wextra',
               '-pedantic', '-std=c++17',
               '-I/usr/local/include'
    ],
    CPPPATH='..',
    LINKFLAGS=['-L/usr/local/lib'])

# allows highighting to print to terminal from compiler output
env['ENV']['TERM'] = os.environ['TERM']

progs = Split(
    '''
    accumulate
    batched
    chain
    chunked
    combinatoric
    compress
    count
    cycle
    dropwhile
    enumerate
    filter
    filterfalse
    groupby
    imap
    range
    repeat
    reversed
    slice
    sliding_window
    sorted
    starmap
    takewhile
    unique_justseen
    unique_everseen
    zip
    ''')

if Configure(env).CheckCXXHeader('boost/optional.hpp'):
    progs.append('zip_longest')
    progs.append('mixed')

for p in progs:
    env.Program('{0}_examples.cpp'.format(p))
